#include "tcl_mstar_atv_tv.h"

TCL_MSTAR_ATV_TV::TCL_MSTAR_ATV_TV()
{
}

int TCL_MSTAR_ATV_TV::Read_Data(QDataStream &in)
{
  in>>ui2_ch_val
    >>ui2_freq
    >>ui2_audio_id
    >>ui2_vedio_id
    >>ps_name;
  return 1;
}

int TCL_MSTAR_ATV_TV::Write_Data(QDataStream &out)
{
  out<<ui2_ch_val
     <<ui2_freq
     <<ui2_audio_id
     <<ui2_vedio_id
     <<ps_name;
  return 1;
}

void TCL_MSTAR_ATV_TV::set_Data(int order,QVariant value)
{
     switch(order)
     {
     case 0:
        ui2_ch_val=(ushort)value.toUInt();
        break;
     case 1:
        ui2_freq=(ushort)value.toUInt();
        break;
     case 2:
        ui2_audio_id=(ushort)value.toUInt();
        break;
     case 3:
        ui2_vedio_id=(ushort)value.toUInt();
        break;
     case 4:
        ps_name=value.toString();
        break;
     default:
        qDebug("in TCL_MSTAR_ATV_TV::set_Data() row error");
     }
}
